﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Shoping_cart.aspx.cs" Inherits="Shoping_cart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent"  Runat="Server">
    <asp:GridView ID="grv_shoping_cart" runat="server" DataKeyNames="item_id" 
        AutoGenerateColumns="false" onrowediting="grv_shoping_cart_RowEditing" 
        onrowcancelingedit="grv_shoping_cart_RowCancelingEdit" 
        onrowdeleting="grv_shoping_cart_RowDeleting" 
        onrowupdating="grv_shoping_cart_RowUpdating">

    <Columns>
        <asp:TemplateField >   
                                <HeaderTemplate><asp:CheckBox ID="chkCheckAll" runat="server" AutoPostBack="true" OnCheckedChanged="onCheckedChange"/></HeaderTemplate>                             
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkChecked" runat="server"   />
                                </ItemTemplate>
                            </asp:TemplateField>
     
        <asp:TemplateField HeaderText="Item ID">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%#Eval("item_id") %>'></asp:Label>
            </ItemTemplate>            
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Item Name">
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%#Eval("name") %>'></asp:Label>
            </ItemTemplate>            
        </asp:TemplateField>

        <asp:TemplateField HeaderText="Price">
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%#Eval("price") %>'></asp:Label>
            </ItemTemplate>            
        </asp:TemplateField>

        <asp:TemplateField HeaderText="QUantity">
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%#Eval("quantity") %>'></asp:Label>
            </ItemTemplate>            
            <EditItemTemplate>
                <asp:TextBox ID="txtQuantity" runat="server" Text='<%#Eval("quantity") %>'></asp:TextBox>
            </EditItemTemplate>            
        </asp:TemplateField>

        <asp:TemplateField HeaderText="Amount">
            <ItemTemplate>
                <asp:Label ID="Label5" runat="server" Text='<%#Eval("amount") %>'></asp:Label>
            </ItemTemplate>            
        </asp:TemplateField>
        <asp:CommandField ShowEditButton = "true" />
        <asp:CommandField ShowDeleteButton="true" />
    </Columns>
    </asp:GridView>
</asp:Content>

